-- sacrifice_demon
-- created by panyl
-- 魔神雕像提交装备

return {
    doAction = function(action, extra)
        local pos = action.pos;
        local data = action.data;
        local s = data % 2 == 1;
        local classId = math.modf(data / 2);
        local equips = {};

        if nil == extra then
            if s then
                -- 单件装备
                equips = { classId, };
            else
                -- 套装
                equips = SuitM.query(classId, "active") or {};
            end
        else
            -- 已经指明了装备列表了
            equips = extra;
        end

        return DemonStatueM.submit(equips, pos);
    end,
};
